<?php
/**
 * 用户中心控制器congcong
 */
namespace Home\Controller;
use Think\Controller;
class UserController extends HomeController{
    /**
     * 个人中心控制器
     */
    public function index()
    {
         $where['uid']=!empty($_SESSION['uid'])?$_SESSION['uid']:'';
         
         $result=M('user')->where($where)->find();///手机端登陆获取用户名

        
         $this->assign('result',$result);
      
         $this->display();
    }

    //输出二维码图片
    public function setQrcode(){
    	$uid=empty($_SESSION['uid'])?$_SESSION['uid']:0;
    	$url='http://s.jiathis.com/qrcode.php?url='.C('SITENAME').'/vshop.php/Home/Login/resister/uid/'.$uid;
    	$content=file_get_contents($url);
    	header("content-type:image/png");
    	echo $content;

    }
    

}